package net.home.test.interceptors;


import java.util.Map;

import net.web.belerofont.action.Interceptor;
import net.web.belerofont.action.Invoker;
import net.web.belerofont.action.URIMap;

import org.apache.log4j.Logger;

public class LogGlobarInterceptor implements Interceptor {

	public final Logger LOG = Logger.getLogger(LogGlobarInterceptor.class);

	public void init(Map config) {
	}

	public URIMap intercept(Invoker invocator) {
		
		LOG.debug("Before next invoke: " + invocator.getContext().getHttpRequest().getRequestURI());

		URIMap uri = invocator.invoke();
		
		LOG.debug("After next invoke: " + invocator.getContext().getHttpRequest().getRequestURI());
		
		return uri;
	}

}
